<?
$settings = array(); 

//mysql server does NOT listen to anything other than localhost
//so don't get any smart ideas :P
$settings['root']         = realpath('.') . '/';
$settings['db']['server'] = 'localhost';
$settings['db']['user']   = 'mednoter';
$settings['db']['pass']   = 'm3d1c5';
$settings['db']['name']   = 'mednotes_dev'; 

function ConnectToDB()
{
	global $settings;
	//mysql server does NOT listen to anything other than localhost
	//so don't get any smart ideas :P
	$s = $settings['db']['server'];
	$u = $settings['db']['user'];
	$p = $settings['db']['pass'];
	$n = $settings['db']['name'];
	
	$link = mysql_connect($s,$u,$p);
	$db = mysql_select_db($n,$link);
	
	return $db;
}

?>
